package design.Command;

/**
 * Created by looper on 2017/8/21.
 */
public class CommandTest {
  public static void main(String[] args) {
    //创建一个程序员 name = "坑露"
    Receiver programmer = new Receiver("坑露");
    //为这个命令指定一个执行者
    Command command = new ConcreteCommand(programmer);

    //为这个命令指定一个调用者
    Invoker boss = new Invoker(command);
    //执行
    boss.action();
  }
}
